home *** CD-ROM | disk | FTP | other *** search
/ Quick PC 61 / Quick PC 61.iso / I386 / WMS.CAB / topics_.js < prev    next >
Encoding:
JavaScript  |  2003-02-21  |  771 b   |  28 lines

  1. /* Copyright (c) Microsoft Corporation.  All rights reserved. */
  2. function get_topic( nIndex ){
  3.     if ( 0 == Contents.recordset.RecordCount )
  4.         return ( "CONTENTS NOT FOUND!" );
  5.     
  6.     if ( nIndex < 0 && nIndex >= Contents.recordset.RecordCount )
  7.         return ( "INVALID TOPIC INDEX! [ " + nIndex + " ]");
  8.         
  9.     Contents.recordset.MoveFirst();
  10.     Contents.recordset.Move( nIndex );
  11.     return ( Contents.recordset.fields.item('contents').value );
  12. }
  13. function setInnerText( elem, value ){
  14.     elem.innerText = value;
  15. }
  16. function setInnerHTML( elem, value ){
  17.     elem.innerHTML = value;
  18. }
  19. function setImage( elem, sURL ){
  20.     elem.src = sURL;
  21. }
  22. function setDisplay( element, bool ){
  23.     if (bool == false)
  24.         element.style.display = "none";
  25.     else
  26.         element.style.display = "";
  27. }
  28.